package io._520;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;

public class StreamDemo3 {
    public static void main(String[] args) {
        List<Integer> list=new ArrayList<>();
        Random ran=new Random();
        for (int i = 0; i < 10; i++) {
            list.add(ran.nextInt(10));
        }
        System.out.println(list);
        List<Integer> collect = list.stream().map(x -> x * 5).filter(x -> x % 2 == 0).distinct().sorted((x, y) -> y - x).collect(Collectors.toList());
        System.out.println(collect);
    }
}
